
function validate() {
	var errStr = "";
	var username = document.getElementById("username").value;
	var password = document.getElementById("password").value;
	if (username == "" || username == null) {
		errStr = "please input the username";
		alert(errStr);
		return false;
	}
	if (!username.match(new RegExp("^[0-9]+$"))) {
		errStr = "the username must be numbers";
		alert(errStr);
		return false;
	}
	if (password == "" || password == null) {
		errStr = "please input the password";
		alert(errStr);
		return false;
	}
	if (!password.match(new RegExp("^[A-Za-z0-9]+$"))) {
		errStr = "wrong password";
		alert(errStr);
		return false;
	}
}

